<style lang="scss" scoped>
.systemBox {
    padding: 10px;
    .texts {
        margin-bottom: 10px;
        padding: 10px;
        margin-top: 10px;
        width: 100%;
        border: 1px solid #efefef;

        span {
            font-size: 16px;
        }
    }
}
</style>
<template>
    <div class="systemBox">
        <van-nav-bar title="H币入账消息" left-arrow @click-left="$router.push('/mymessage')" />
        <div class="texts" v-for="(item, index) in HcoinMsg" :key="index">
            <span>
                {{ item.content }}
                <span style="color: blue;" @click="$router.push('/mywallet')">立即查看>></span>
            </span>
        </div>
    </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'
import { request } from '../../axios/request'
import { ref } from 'vue'

// 获取userId, sessionId
const doctorId = ref(JSON.parse(localStorage.getItem('doctorId')|| '') )
const sessionId = ref(JSON.parse(localStorage.getItem('sessionId')|| '') )

// H币入账消息
const HcoinMsg:any = ref([])
const getHcoin = async () => {
    await request
        .get('/api/health/doctor/verify/v1/findDoctorHealthyCurrencyNoticeList', {
            params: {
                page: 1,
                count: 10
            },
            headers: {
                doctorId: doctorId.value as number,
                sessionId: sessionId.value as string
            }
        })
        .then((res) => {
            console.log(res.data)
            HcoinMsg.value = res.data.result
            console.log(HcoinMsg.value)
        })
}
getHcoin()
</script>